﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Dto
{
    public class EBSMaterialDataDTO
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 计量单位
        /// </summary>
        public string? UnitName { get; set; }

        /// <summary>
        /// 物料类别名称
        /// </summary>
        public string? MaterialCategoryName { get; set; }
    }

    /// <summary>
    /// ebs入库单数据
    /// </summary>
    public class EBSReceivingBillDTO
    {
        /// <summary>
        /// 入库单号
        /// </summary>
        public string BilNo { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public int BillType { get; set; }
        
        public List<EBSReceivingBillDetailListDTO> items { get; set; }
    }
    public class EBSReceivingBillDetailListDTO
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string BatchNo { get; set; }

        /// <summary>
        /// 物料收货数量
        /// </summary>
        public int Qty { get; set; }
    }

    /// <summary>
    /// ebs出库单据
    /// </summary>
    public class EBSShippingOrderDTO
    {
        /// <summary>
        /// 出库单号
        /// </summary>
        [Required]
        public string OrderSn { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        [Required]
        public int BillType { get; set; }

        [Required]
        public List<EBSShippingOrderDetailListDTO> items { get; set; }
    }

    public class EBSShippingOrderDetailListDTO
    {
        public string MaterialCode { get; set; }

        public string MaterialName { get; set; }

        public int OutQty { get; set; }

    }

    public class EBSDocumentsDTO
    {
        /// <summary>
        /// 单子类型 1入库 2出库
        /// </summary>
        public int OrderType { get; set; }

        /// <summary>
        /// 单号
        /// </summary>
        public string OrderSn { get; set; }

        /// <summary>
        /// 单据类别
        /// </summary>
        public int BillType { get; set; }

        public List<EBSDocumentsDTOListDTO> items { get; set; }
    }

    public class EBSDocumentsDTOListDTO
    {
        public string MaterialCode { get; set; }

        public string MaterialName { get; set; }

        public int Qty { get; set; }

    }
}
